#!/bin/bash
WORK_PATH='/usr/liszter/webhook'
cd $WORK_PATH
echo "清理老代码"
git reset --hard origin/master
git clean -f
echo "拉取新代码"
git pull origin master
echo "执行构建"
docker build -t webhook:1.0 .
echo "停止旧容器"
docker stop vuehook-container
docker rm vuehook-container
echo "启动新容器"
docker container run -p 8204:8204 --name vuehook-container -d webhook:1.0